import request from '@/utils/request'

export function getdepartment() {
  return request({
    method: 'GET',
    url: '/company/department'
  })
}

// 获取员工简单列表
export function getManagerList() {
  return request({
    method: 'GET',
    url: '/sys/user/simple'
  })
}

// 添加按钮
export function addDept(data) {
  return request({
    method: 'POST',
    url: '/company/department',
    data
  })
}

// 获取部门详情
export function getDeptDetail(id) {
  return request({
    method: 'GET',
    url: `/company/department/${id}`
  })
}

// 根据ID修改部门详情
export function editDeptDetail(data) {
  return request({
    method: 'PUT',
    url: `/company/department/${data.id}`,
    data
  })
}

// 删除部门
export function delDept(id) {
  return request({
    method: 'DELETE',
    url: `/company/department/${id}`
  })
}
